﻿using AutomaticScrewLocking.domain.torque.dataStorage.model.valobj;
using AutomaticScrewLocking.domain.torque.dataStorage.service.impl;
using System;

namespace AutomaticScrewLocking.domain.torque.dataStorage.service
{
    /// <summary>
    /// 存储服务工厂类
    /// </summary>
    public class DataStorageFactory
    {
        public DataStorageService getDataStorageService(DataStorageType type)
        {
            /*if (null == type) return null;*/
            if (DataStorageType.MYSQL == type) return new MySqlDataStorageServiceImpl();
            if (DataStorageType.CSV == type) return new CsvDataStorageServiceImpl();
            throw new Exception("不存在的存储服务类型");
        }
    }
}
